import http from './axios'

/* 消息相关 */

// 发送消息
export const SendMessage = message => http('POST', '/message/send', message)
// 阅读信息
export const ReadMessage = friendId => http('PUT', `/message/read/${friendId}`)
// 查询消息
export const GetMessagePage = (friendId, page, size) => http('GET', '/message/page', {
  friendId,
  page,
  size
})

/* 举报相关 */

// 举报
export const SendAlert = alertMessage => http('POST', '/message/alert', alertMessage)
// 处理举报
export const HandleAlert = alertMessage => http('PUT', '/message/alert/handle', alertMessage)
// 查询举报消息
export const GetAlertMessagePage = (isHandle, page, size) => http('GET', '/message/alert/page', {
  isHandle,
  page,
  size
})
